<template>
	<view class="lawyer-detail">
		<common-navbar title="律师详情" />
		<topBg />
		<lawyerIntroduce :lawyerDetailData="lawyerDetailData"/>
		<consultList :lawyerDetailData="lawyerDetailData"/>
		<serviceEvaluation />
		<bottomConsultBar :lawyerDetailData="lawyerDetailData"/>
	</view>
</template>

<script>
	import topBg from "./components/top-bg/topBg.vue";
	import lawyerIntroduce from "./components/lawyer-introduce/lawyerIntroduce";
	import consultList from "./components/consult-list/consultList.vue";
	import serviceEvaluation from "./components/service-evaluation/serviceEvaluation.vue";
	import bottomConsultBar from "./components/bottom-consult-bar/bottomConsultBar.vue";
	export default {
		components: {
			topBg,
			lawyerIntroduce,
			consultList,
			serviceEvaluation,
			bottomConsultBar,
		},

		onLoad(options) {
			this.lawyerId = options.id;
			this.getLawyerDetail();
		},
		data() {
			return {
				lawyerId: '',
				lawyerDetailData:null,
			}
		},
		methods:{
			async getLawyerDetail(){
				const {data} = await this.$u.post(this.$restUrl.getLawyerDetail,{
					lawyer_id:this.lawyerId,
				})
				this.lawyerDetailData = data;
				console.log(data);
			}
		}
	}
</script>

<style scoped lang="scss">
	@import "./lawyerDetail.scss";
</style>
